function mat=load_nifti(filename)
nii1=load_untouch_nii(filename);
mat2=nii1.img;
mat=zeros(size(mat2,2),size(mat2,1),size(mat2,3));
for i=1:size(mat,3)
    mat(:,:,i)=imrotate(mat2(:,:,i)',180);
end
